/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.instrumentation;

import picounit.Instrumentation;
import picounit.Registry;
import picounit.features.Feature;
import picounit.features.base.FeatureRegistry;
import picounit.features.failures_first.ProblemTracker;

public class InstrumentationFeature implements Feature {
	private final Registry registry;
	private final ProblemTracker problemTracker;

	public InstrumentationFeature(Registry registry, ProblemTracker problemTracker) {
		this.registry = registry;
		this.problemTracker = problemTracker;
	}

	public void addFeatures(FeatureRegistry featureRegistry) {
		Instrumentation instrumentation = new InstrumentationImpl(problemTracker);

		featureRegistry.addFeatures(instrumentation);

		registry.register(Instrumentation.class, instrumentation);
	}
}
